#ifndef __CSTATEMANAGER_H__
#define __CSTATEMANAGER_H__

#include "include/IStateManager.h"

typedef std::list<IStateHandler*>   StateHandlerList;

/**
* Class: CStateManager
* @author Ismael González Burgos
* Class to manage a sort of states. The StateClass has to be registered. And the first state given.
*/
class CStateManager : public IStateManager
{
protected:
    StateHandlerList shl;

public:
    /**
    * Default constructor.
    */
    CStateManager();

    /**
    * Destructor.
    */
    virtual ~CStateManager();

    virtual void AddStateHandler(IStateHandler *nsh,u32 FirstState);
    virtual void Update();

    virtual void ChangeState(IStateHandler *sh,u32 newState);
	virtual void SetFinish(IStateHandler *sh);

};

#endif
